<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>

        <title>Listar Table Space</title>
        <link rel="shortcut icon" href="../Data/images/Saved-Data-Utility.ico" type="image/x-icon"/>
        <link rel="stylesheet" href="Data/CSS/content.css" type="text/css"/>

    </h:head>

    <h:body>
        <h:form id="formlistTableSpace">

            <h:panelGrid style="margin: 0 auto">
                <p:outputLabel value="ELIMINAR PERMANENT TABLESPACE" style="color: #2480BC;"/>
            </h:panelGrid>

            <p:separator/>

            <p:growl id="growlMO" showDetail="true" life="3000" autoUpdate="true"/>
            <!--Area de Trabajo -->            
            <p:dataTable id="dataTableTS" var="tablespace" value="#{deleteTableSpaceBeanPermanent.mediumTableSpaceModel}" 
                         paginator="true" rows="15"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" 
                         rowsPerPageTemplate="5,10,15"
                         selection="#{deleteTableSpaceBeanPermanent.selectedtablespace}"
                         selectionMode="single">
                
                <f:facet name="header"> 
                    Permanent TableSpaces
                </f:facet>

                <p:column headerText="Tablespace">  
                    <h:outputText value="#{tablespace.name}" />  
                </p:column>  

                <p:column headerText="Init Ext">  
                    <h:panelGroup rendered="#{tablespace.initialExt == -1}">
                        <h:outputText value="NULL" />  
                    </h:panelGroup>
                    <h:panelGroup rendered="#{tablespace.initialExt!=-1}">
                        <h:outputText value="${tablespace.initialExt}" />  
                    </h:panelGroup>
                </p:column>  

                <p:column headerText="Next Ext">   
                    <h:panelGroup rendered="#{tablespace.nextExt == -1}">
                        <h:outputText value="NULL" />  
                    </h:panelGroup>

                    <h:panelGroup rendered="#{tablespace.nextExt!=-1}">
                        <h:outputText value="${tablespace.nextExt}" />  
                    </h:panelGroup>
                </p:column>

                <p:column headerText="Min Ext">  

                    <h:panelGroup rendered="#{tablespace.minExt == -1}">
                        <h:outputText value="NULL" />  
                    </h:panelGroup>

                    <h:panelGroup rendered="#{tablespace.minExt!=-1}">
                        <h:outputText value="${tablespace.minExt}" />  
                    </h:panelGroup>

                </p:column>

                <p:column headerText="Max Ext">  
                    <h:panelGroup rendered="#{tablespace.maxExt == -1}">
                        <h:outputText value="NULL" />  
                    </h:panelGroup>

                    <h:panelGroup rendered="#{tablespace.maxExt!=-1}">
                        <h:outputText value="${tablespace.maxExt}" />  
                    </h:panelGroup>
                </p:column>

                <p:column headerText="% Inc">   
                    <h:panelGroup rendered="#{tablespace.pctIncrease == -1}">
                        <h:outputText value="NULL" />  
                    </h:panelGroup>

                    <h:panelGroup rendered="#{tablespace.pctIncrease!=-1}">
                        <h:outputText value="${tablespace.pctIncrease}" />  
                    </h:panelGroup>
                </p:column>
            </p:dataTable>

            <br/>

            <h:panelGrid style="margin: 0 auto" columns="1" >

                <p:commandButton value="Drop" style="color: #2480BC;"  action="#{deleteTableSpaceBeanPermanent.drop()}" update="dataTableTS">
                    <p:confirm header="Confirmation" message="Esta Seguro de Eliminar Este TableSpace?" icon="ui-icon-alert" /> 
                </p:commandButton>   
                <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">  
                    <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check"/>  
                    <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close"/>       
                </p:confirmDialog> 
            </h:panelGrid>

        </h:form>
    </h:body>
</html>
